<script>
export default {
	onLaunch: function() {
		console.log('App Launch');
	},
	onShow: function(options) {
		console.log('App Show');
    console.log(options);
    if(options.query.sourceUserId != '' && options.query.sourceUserId != null){
      uni.setStorageSync("sourceId",options.query.sourceUserId)
    }
		
	},
	onHide: function() {
		console.log('App Hide');
	}
};
</script>

<style lang="scss">
/*每个页面公共css */
	@import './static/icon.css';

page {
	height: 100%;
	font-size: $font-size;
}

.container {
	height: 100%;
	overflow-y: auto;
	background: $bg-color;
	font-size: $font-size;
}

.scroll-menu-list {
	flex-shrink: 1;
	display: flex;
	align-items: center;
	white-space: nowrap;
	.item {
		display: inline-block;
		margin-right: 40rpx;
		position: relative;
		height: 60rpx;
		font-size: $font-size-max;
		image.imga {
			width: 30rpx;
			position: absolute;
			left: 50%;
			bottom: -0rpx;
			opacity: 0;
			margin-left: -20rpx;
			text-align: center;
		}
	}
	.active {
		font-size: $font-size-max + 4;
		font-weight: 600;
		image.imga {
			opacity: 1;
		}
	}
}
.shop-list-data {
	margin-top: $interval-min;
	padding-bottom: 1rpx;
	.item {
		background: linear-gradient(180deg, #f4ede7 0%, #fffffe 100%);
		border-radius: 20rpx;
		padding: 23rpx $interval 0px;
		margin-bottom: 16rpx;
		.head {
			display: flex;
      padding-bottom: 20rpx;
			.avatar {
				width: 96rpx;
				height: 96rpx;
				border-radius: 50%;
			}
			.info {
				flex: 1;
				margin-left: $interval-min;
				.title {
					font-size: $font-size-max;
					display: flex;
					justify-content: space-between;
					align-items: center;
					.btn {
						width: 104rpx;
						height: 44rpx;
						line-height: 44rpx;
						text-align: center;
						color: #fff;
						background: linear-gradient(90deg, #ff7c45 0%, #f63737 100%);
						border-radius: 30rpx;
						font-size: $font-size-min;
					}
				}
				.attr {
					display: flex;
					align-items: center;
					font-size: 24rpx;
					margin-top: 10rpx;
					color: #6e6d69;
					.tag {
						line-height: 28rpx;
						background: #ffffff;
						border-radius: 6rpx;
						color: rgb(174, 110, 42);
						padding: 2rpx;
						margin-right: 5rpx;
						font-size: 22rpx;
						border: 1rpx solid rgb(220, 159, 90);
					}
					.interval {
						color: rgb(253, 113, 0);
						padding: 0px 15rpx 0px 5rpx;
					}
				}
				.grey {
					font-size: 24rpx;
					color: #ccccca;
					margin-top: 10rpx;
				}
				.main {
					margin-top: 20rpx;
					display: inline-block;
					//background-color: #fff2cf;
					line-height: 45rpx;
					border-radius: 30rpx;
					padding: 0px 6rpx;
					color: #ecc438;
				}
			}
		}
		.list {
			display: flex;
			/*justify-content: space-between;*/
			padding: 4rpx 0px 32rpx;
			.url {
				width: 24%;
				//padding: 4rpx;
        margin-left: 4rpx;
				border: 2rpx solid #eeeeec;
        border-radius: 12rpx;
				.img {
					display: block;
					width: 100%;
					height: 180rpx;
          border-radius: 12rpx;
				}
			}
		}
	}
}
.product-data-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin: 0px -12rpx;
	background-color: $bg-color;
	.item {
		width: 49%;
		margin-top: 18rpx;
		border-radius: 14rpx;
		position: relative;
		overflow: hidden;
		background-color: #fff;
		.img {
			width: 100%;
		}
		.title {
			padding: 0px 20rpx;
			margin-top: 10rpx;
			overflow: hidden;
			height: 70rpx;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 2;

			.yang {
				display: inline;
				width: 52rpx;
				line-height: 28rpx;
				background: linear-gradient(90deg, #00aaa6 0%, #54d6d2 100%);
				border-radius: 4rpx;
				color: #fff;
				font-size: -2 + $font-size-min;
				text-align: center;
        padding: 0 6rpx;
			}
			.xin {
				display: inline;
				width: 52rpx;
				height: 28rpx;
				background: linear-gradient(90deg, #f63737 0%, #ff7c45 100%);
				border-radius: 4rpx;
				color: #fff;
				font-size: -2 + $font-size-min;
				text-align: center;
        padding: 0 6rpx;
			}
		}
		.price {
			color: #ec2714;
			font-size: $font-size-max + 6;
			font-weight: bold;
			padding: 14rpx 20rpx;
			text {
				font-size: $font-size;
				margin-right: -10rpx;
			}
		}
		.tagj,
		.new,
		.tagy {
			position: absolute;
			font-size: -2 + $font-size-min;
			text-align: center;
			height: 28rpx;
			line-height: 28rpx;
			color: #fff;
			top: 0px;
		}
		.new {
			left: 0px;

			width: 80rpx;
			background: linear-gradient(90deg, #ff7c45 0%, #f63737 100%);
			border-radius: 14rpx 0rpx 14rpx 0rpx;
		}
		.tagj {
			right: 0px;
			width: 172rpx;
			height: 28rpx;
			background: #00b7b3;
			border-radius: 14rpx 0rpx 0rpx 14rpx;
		}
		.tagy {
			right: 0px;
			width: 172rpx;
			height: 28rpx;
			background: #6a76ff;
			border-radius: 14rpx 0rpx 0rpx 14rpx;
		}
	}
}

/**
 * 瀑布流
 */
.waterfall-data-list {
		
		.play {
			position: absolute;
			right: 20rpx;
			top: 20rpx;
			width: 40rpx;
			height: 40rpx;
			z-index: 33;
		}
		.zhibo {
			position: absolute;
			right: 20rpx;
			top: 20rpx;
			line-height: 40rpx;
			z-index: 33;
			background: rgba(0, 0, 0, 0.5);
			color: #fff;
			display: flex;
			font-size: $font-size-min;
			border-radius: 20rpx;
			padding-right: 25rpx;
			image {
				width: 40rpx;
				height: 40rpx;
				display: block;
				margin-right: 15rpx;
			}
		}
		.item {
			padding: $interval-min;
			.title {
				display: flex;
				-webkit-line-clamp: 2;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			.user {
				display: flex;
				font-size: $font-size-min;
				align-items: center;
				margin-top: 20rpx;
				color: $text-color-grey;
				.name {
					flex: 1;
					display: flex;
					align-items: center;
				
					.avatar {
						width: 40rpx;
						height: 40rpx;
						border-radius: 20rpx;
						margin-right: 10rpx;
					}
					text{
						flex: 1;
							white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
						width: 0px;
					}
				}
				.num {
					display: flex;
					align-items: center;
					margin-left: $interval;
					.imga {
						width: 20rpx;
						margin-right: 10rpx;
					}
				}
			}
		}
	}
</style>
